//
//  UIFactory.m
//  UILbrary
//
//  Created by mac on 16/12/24.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "UIFactory.h"

@implementation UIFactory
+ (UIButton *)buttonWithFrame:(CGRect )frame backgroundImageName:(NSString *)backgroundImageName imageName:(NSString *)imageName title:(NSString *)title titleColor:(UIColor *)color{
    UIButton *button = [[UIButton alloc] initWithFrame:frame];
    [button setBackgroundImage:[UIImage imageNamed:backgroundImageName] forState:UIControlStateNormal];
    [button setImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
    [button setTitle:title forState:UIControlStateNormal];
    [button setTitleColor:color forState:UIControlStateNormal];
    return button;
}
@end
